<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="pc/include :: header('提现')" />

    <link th:href="@{/js/ui-table/ui-table.css}" rel="stylesheet"/>
</head>
<body>
<th:block th:include="pc/include :: top" />
<div class="iw">
    <div class="crumbs">
        <p>当前位置：<a href="/">首页</a> > <a href="/user/center">个人中心</a> > 进行提现</p>
    </div>
    <div class="center_left">
        <th:block th:include="pc/include :: menu" />
    </div>
    <div class="center_right">

        <span th:if="${message}" th:utext="${message}" style="font-size: 20px;color:#f60"></span>

            <form th:if="${message}==''" id="form_cash" action="/user/cashout" method="post">
                <h1 class="vip_head">提现</h1>     
                <div class="cash_stepzero unselect">
                    <h3>1.提现(<span th:text="${tradeset.glodname}" th:remove="tag"></span>)</h3>
                    <div class='ui-text-group'>
                        <input id="glods" name="glods" type="number" th:value="${tradeset.glodout / tradeset.glodrate}" class="ui-text" data-valid data-must="必须输入数量" data-reg="^\d*$" data-reg-msg="请输入正确数量" th:attr="data-min=${tradeset.glodout / tradeset.glodrate},data-max=${user.glods}" /><span></span>
                        <lable>请输入提现数量</lable>
                    </div>
                </div>
                <div class="cash_steptwo">
                    <h3>2.请输入提现账号</h3>
                    <div class="ui-dropdown-search">
                        <div class="ui-dropdown">
                            <div>支付宝</div>
                            <ul>
                                <li data-val="1">支付宝</li>
                                <li data-val="2">银行转账</li>
                                <li data-val="3">其他</li>
                            </ul>
                            <input type="hidden" name="from" value="1" />
                            <i></i>
                        </div>
                        <div class="ui-search">
                            <input type="text" name="account" placeholder="请输入账号" class="ui-text" data-valid data-must="#"/>
                        </div>
                    </div>
                </div>
                <div class="vip_stepthr">
                    <h3>3.提现金额 <span id="vip_cash">¥ <div th:text="${tradeset.glodout / tradeset.glodrate * tradeset.glodrate * ugroup.divide}" th:remove="tag"></div></span> 元 , <tip>提现金额 = 提现数量 * 兑换比例(<span th:text="${tradeset.glodrate}" th:remove="tag"></span>) * 提现利率(<span th:text="${ugroup.divide}" th:remove="tag"></span>)</tip></h3>
                    <span class="ui-btn"><a submit='#form_cash' tip='确认提交?'>我要提现</a></span>
                </div>
            </form>
        <?php } ?>
    </div>
</div>
<th:block th:include="pc/include :: footer" />
<script th:src="@{/js/nstSlider/jquery.nstSlider.min.js}"></script>
<script>
    $(function () {
        $("#glods").change(function(){
            id = $(this).val();
            $("#vip_cash").text('¥' + (id * Number('[(${tradeset.glodrate})]') * Number('[(${ugroup.divide})]')).toFixed(2));
        });

        $(".vip_steptwo div").click(function () {
            $this = $(this);
            $(".vip_steptwo div").removeClass("active");
            $this.addClass("active");
        });
    });
</script>